import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { AdService } from '../../../services/ad/ad.service';
import { AdItem } from '../../../models/ad/ad.item';

/**
 * Generated class for the AdMyAppPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-ad-my-app',
  templateUrl: 'ad-my-app.html',
})
export class AdMyAppPage {
  ads: AdItem[];

  constructor(
    public navCtrl: NavController,
    public navParams: NavParams,
    private adService: AdService) {
  }
  
  ngOnInit() {
    this.ads = this.adService.getAds();
  }
}
